#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QTimer>

class QButtonGroup;

typedef struct _PID_PMT{

    float _ErrorVal;
    float _SetVal;
    float _KP;
    float _KI;
    float _KD;
    float _T;
    float _TS;
    float _OutOutP;

    float _ErrorSum;
    float _ErrorLast;

    float _CurrVal;
    float _OutVal;
    float _Item_KP;
    float _Item_KI;
    float _Item_KD;
    float _Item_PID;
    _PID_PMT(){
        _ErrorVal=0.0;
        _SetVal=0.0;
        _KP=0.0;
        _KI=0.0;
        _KD=0.0;
        _T=0.0;
        _TS=0.0;
        _OutOutP=0.0;

        _ErrorSum=0.0;
        _ErrorLast=0.0;

        _CurrVal=0.0;
        _OutVal=0.0;
        _Item_KP=0.0;
        _Item_KI=0.0;
        _Item_KD=0.0;
        _Item_PID=0.0;
    }
}_PID_PMT;

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    void fun_SetText();

public slots:
    void slots_btnChlickedStart();
    void slots_btnChlickedStop();
    void slots_editingFinished();
    void slots_RadioGroupChange(int id);
    void slots_TimeOut();
    void slots_CurveOffSet();
public:
    _PID_PMT m_PID_PMT;
    QTimer *m_Timer;
    QTimer *m_Timer_addData;
    double m_MaxKey;

    QButtonGroup *m_Btngroup;
    int m_RadId;
private:
    Ui::MainWindow *ui;
};

#endif // MAINWINDOW_H
